﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ConsoleApp2
{
    class Demo04
    {

        public void Compute(int a, int b) {
            Console.WriteLine("两个整数的和为"+(a+b));
        
        }
        public void Compute(double a, double b) {
            Console.WriteLine("两个小数的和为:"+(a+b)); 
        }
        public void Computer(string a ,string b) {
            Console.WriteLine("两个字符串相加为" + (a + b));
        }
        public void Compute(int a) {
            int sum = 0;
            for (int i = 1; i <= a; i++)
            {
                sum += i;

            }
            Console.WriteLine("1到{0}的整数和为：" + sum, a);
        }
        
    }
}
